let $ = layui.jquery;
let jQuery=$;
let SettingData = {};//配置文件参数
let SeleteData = {};//筛选参数
let current =1;
let raw = '';//排序
let InitData={};
let table_config = {
    "header": {
        "button": [
            {
                "title": "新增",
                "icon": "icon-add-bold",
                "btn_class": "btn_theme_1",
                "is_drop": 2,
                "type": "window",
                "url": "/admin/options/add/",
                "where": "",
                "width": 0,
                "height": 0,
                "node": "admin:options:add"
            }
        ],
        "tab": [],
        "search": {
            "datetime": [
                {
                    "value": "create_time",
                    "label": "新增时间"
                }
            ],
            "like": "名称|编码"
        },
        "sum": []
    },
    "left": {
        "status": 2,
        "title": null,
        "options_id": null,
        "key_field": "value",
        "show_field": "label",
        "field": null,
        "type": 1,
        "url": {
            "title": "",
            "list": "/common/options/leftlists/?num=",
            "add": "",
            "edit": "",
            "delete": "",
            "width": "",
            "height": ""
        }
    },
    "source": "options_type",
    "table": {
        "button": [
            {
                "title": "修改",
                "icon": "icon-edit",
                "btn_class": "btn_theme_1",
                "is_drop": 2,
                "type": "window",
                "url": "/admin/options/edit/?id={id}",
                "where": null,
                "width": 0,
                "height": 0,
                "node": "admin:options:edit"
            },
            {
                "title": "删除",
                "icon": "icon-ashbin",
                "btn_class": "btn_theme_2",
                "is_drop": 2,
                "type": "ajax",
                "url": "/admin/options/delete/?id={id}",
                "where": null,
                "width": 0,
                "height": 0,
                "node": "admin:options:delete"
            }
        ],
        "style": 1,
        "parent_id": "parent_id",
        "parent_name": "title",
        "limit": 30,
        "tab_sum": "",
        "page": true,
        "elem": "datatable",
        "height": "full-85",
        "update": "/admin/options/update_field/",
        "url": "/admin/options/index/",
        "cols": [
            {
                "id": "1713774002_22_1",
                "field": "name",
                "title": "名称",
                "update": ""
            },
            {
                "id": "1713774002_22_2",
                "field": "num",
                "title": "编码"
            },
            {
                "id": "1713774004_22_3",
                "field": "type",
                "title": "类型",
                "width": "160",
                "search": "select",
                "options": "options_type",
                "minWidth": "160"
            },
            {
                "id": "1713774012_22_5",
                "field": "notes",
                "title": "备注",
                "show_rule": ""
            },
            {
                "id": "1713774011_22_4",
                "field": "create_time",
                "title": "新增时间",
                "width": "160",
                "minWidth": "160"
            }
        ]
    }
};
let form_config = {
    detail:'/admin/options/detail/',
    add:'/admin/options/add/',
    edit:'/admin/options/edit/',
    data:{
    "name": "",
    "num": "",
    "type": "1",
    "config": "",
    "mode_id": "",
    "url": "",
    "label": "",
    "value": "",
    "is_token": "2",
    "notes": ""
},
    label_width:'',
    form_label:'form_right',
    onclick:[
    {
        "tag": "radio",
        "field": "type",
        "required": 1,
        "event_val": "1",
        "event_type": "=",
        "event_field": "config"
    },
    {
        "tag": "radio",
        "field": "type",
        "required": 1,
        "event_val": "2",
        "event_type": "=",
        "event_field": "url"
    },
    {
        "tag": "radio",
        "field": "type",
        "required": 1,
        "event_val": "2,3",
        "event_type": "in",
        "event_field": "label"
    },
    {
        "tag": "radio",
        "field": "type",
        "required": 1,
        "event_val": "2,3",
        "event_type": "in",
        "event_field": "value"
    },
    {
        "tag": "radio",
        "field": "type",
        "event_val": "2",
        "event_type": "=",
        "event_field": "is_token"
    },
    {
        "tag": "radio",
        "field": "type",
        "required": 1,
        "event_val": "3",
        "event_type": "=",
        "event_field": "mode_id"
    }
],
};
